//
//  ViewController.swift
//  高仿斗鱼XZZ
//
//  Created by 珍 on 17/4/21.
//  Copyright © 2017年 zhenzhen. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        // 1.标题
        let titles = ["游戏", "娱乐", "趣玩", "美女", "颜值"]
        // 2.所以得子空间器
        var childVcs = [UIViewController]()
        let style = XZTItleViewStyle()
        for _ in 0..<titles.count {
            let vc = UIViewController()
            vc.view.backgroundColor = UIColor.randomColor()
            childVcs.append(vc)
        }

        let pageview = XZPageView(frame: self.view.bounds, titles: titles, childVCs: childVcs, parentVC: self, style:style )
        view.addSubview(pageview)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

